class Star(object):
    def __new__(cls, *args, **kwargs):
        if not hasattr(cls, '_instance'):
            org = super(Star, cls)
            cls._instance = org.__new__(cls, *args, **kwargs)
        return cls._instance

    def __init__(self,name):
        self.name = name

    def __str__(self):
        return self.name


if __name__ == '__main__':
    sun1 = Star('Sun1')
    print(id(sun1), sun1)
    sun2 = Star('Sun2')
    print(id(sun2), sun2)
    print(id(sun1), sun1)